<script setup>
//引入仓库详情数据
import {useDetailStore} from '/src/store/modules/HospitalDetail.js'
const hospitalStore = useDetailStore();


</script>

<template>
  <div class="hospital-detail">
    <div class="top">
      <h2>{{ hospitalStore.hospitalDetail.hospital?.hosname }}</h2>
      <img src="@/assets/03.png" alt="logo"/>
      <h3>医院等级：{{ hospitalStore.hospitalDetail.hospital?.param.hostypeString }}级</h3>
    </div>
    <div class="content">
      <div class="left">
        <img :src="`data:image/jpeg;base64,${hospitalStore.hospitalDetail.hospital?.logoData}`" alt="logo">
      </div>
      <div class="right">
        <h2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;乘车路线<img class="logo" src="@/assets/04.png" alt="route">:</h2>
        <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ hospitalStore.hospitalDetail.hospital?.route }}</p>
      </div>
    </div>
    <div class="bottom">
      <h2>医院简介:</h2>
      <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ hospitalStore.hospitalDetail.hospital?.intro }}</p>
    </div>
  </div>
</template>

<style scoped lang="scss">
.hospital-detail {
  display: flex;
  flex-direction: column;

  .top {
    width: 100%;
    height: 60px;
    display: flex;
    margin-bottom: 20px;
    align-items: center;
    border-radius: 5px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);

    h2 {
      font-size: 28px;
      line-height: 60px;
      margin: 10px;
    }

    img {
      width: 30px;
      height: 30px;
      margin: 10px;
    }

    h3 {
      margin: 10px;
      color: #7f7f7f;
    }
  }

  .content {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 5px;
    font-family:Arial, sans-serif;

    .left {
      width: 100px;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      align-content: center;
      margin-right: 20px;

      img {
        width: 85px;
        height: 85px;
        margin: 10px;
        border-radius: 50%;
        object-position: center;
      }
    }

    .right {
      display: flex;
      flex-direction: column;

      h2 {
        margin: 10px;
        display: flex;
        align-items: center;

        .logo {
          width: 30px;
          height: 30px;
          margin: 5px;
        }
      }

      p {
        margin: 10px;
        font-size: 18px;
        color: #7f7f7f;
      }
    }
  }

  .bottom {
    display: flex;
    flex-direction: column;
    margin: 20px 0px;
    padding: 10px;
    font-family:Arial, sans-serif;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);

    h2 {
      font-size: 24px;
      margin: 10px;
    }

    p {
      color: #7f7f7f;
      margin: 10px;
      font-size: 20px;
    }
  }
}

</style>